<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
  </head>
  <body>
    <!-- <div></div> -->

    <script>
      /*
      1. append 在当前元素对象的末尾追加一个新对象
      */
      const div = document.createElement("div");
      const text = document.createTextNode("hello box");
      // console.log(div);
      // console.log(text);
      document.body.append(div);
      document.body.append(text);
    </script>
  </body>
</html>
